<%-- 
    Document   : View My Grades
    Created on : Nov 10, 2013, 11:51:15 PM
    Author     : reynier
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../assets/ico/favicon.png">

    <title>GRS View My Grades</title>

    <!-- Bootstrap core CSS -->
    <link href="../libs/bootstrap/css/bootstrap.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="../../assets/js/html5shiv.js"></script>
      <script src="../../assets/js/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
      <header>
        <nav class="navbar navbar-default" role="navigation">
            <div class="navbar-header"><p class="navbar-text navbar-left">Grade Report System</p></div>
            <form class="navbar-form navbar-right" method="post" action="../login" >
                <div class="form-group">Signed in as ${sessionScope.UserName}</div>
                <button id="logout" name="logout" type="submit" class="btn btn-link">(Log out)</button>
            </form>
        </nav>    
    </header>
    <div class="container">
        
      <form class="" method="post" action="viewMyGrades" >
        <p class="navbar-text navbar-right">
            <button type="submit" name="backToCourses" id="backToCourses" class="btn btn-default btn-lg">
            <span class="glyphicon glyphicon-circle-arrow-left"></span> Back to courses
        </button>
            </p>
        <h2>My Grades</h2>
        <p class="lead">Grades earned on the assignments and exams of this class.</p>
      </form>
      <div class="list-group">
          <h4 class="list-group-item-heading">(${section.getSectionName()}) <span class="text-info"> ${section.getCourse().getCourseCode()} - ${section.getCourse().getCourseName()}</span></h4>
          <p class="list-group-item-text">${section.getProfessor().getFirstName()} ${section.getProfessor().getLastName()}</p>
      </div>
      
      <div class="row">
        <div class="span5">
            <table class="table table-striped table-condensed">
                <thead>
                  <tr>
                    <th>Name</div>
                    <th>Assigned Date</div>
                    <th>Due Date</th>
                    <th>Points Earned</th>
                    <th>Max Points</th>
                    <th>Grade</th>
                    <th>Weight</th>
                    <th>Comments</th>           
                  </tr>
              </thead>   
              <tbody>
                   <c:forEach items="${grades}" var="grade">
                    <tr>
                        <td>${grade.getClassWork().getName()}</td>
                        <td>${grade.getClassWork().getAssignedDate()}</td>
                        <td>${grade.getClassWork().getDueDate()}</td>
                        <td>${grade.getPointsEarned()}</td>
                        <td>${grade.getClassWork().getMaxPoints()}</td>
                        <td>${grade.getLetterGrade().getLetter()}</td>
                        <td>${grade.getClassWork().getWeight()}%</td>
                        <td>${grade.getComments()}</td>
                    </tr>
                  </c:forEach>
              </tbody>
            </table>
            </div>
	</div>
    </div> <!-- /container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <script src="../libs/jquery/jquery-2.0.3.min.js"></script>
    <script src="../libs/jqwidgets/jqx-all.js"></script>
    <script src="../libs/bootstrap/js/bootstrap.min.js"></script>
    <!-- Placed at the end of the document so the pages load faster -->
  </body>
</html>

